class Anaimal {
	private String type; // 动物种类
	private int age; // 年龄

	// 设置和获取动物属性
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
}
class Tigger {
	private String name; // 老虎名称
	private int age; // 老虎年龄
	private String type; // 老虎种类

	// 设置和获取老虎属性
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
//}

class Anaimal {
	private String type;
	private int age;
	public Anaimal(String type, int age) {
		this.type = type;
		this.age = age;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
}
// 老虎类继承动物类
class Tigger extends Anaimal{
	// 定义自己的名称属性
	private String name;

	// 如果子类没有覆盖父类的构造方法则默认调用父类的构造方法
	public Tigger(String type, int age) {
		super(type, age);
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public static void main(String[] args) {
		Tigger tigger = new Tigger("老虎",18);
		tigger.setName("旺财");
		System.out.printf("动物品种：%s\t名称：%s\t年龄：%d",tigger.getType(),tigger.getName(),tigger.getAge());
	}
}